//
//  ViewController.m
//  PresentViewController
//
//  Created by student on 16/2/24.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import "ViewController.h"
#import "BViewController.h"
#import "DViewController.h"
#import "EViewController.h"
@interface ViewController ()

@end

@implementation ViewController
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    if([segue.identifier isEqualToString:@"popb"])
    {
        BViewController *vcb=segue.destinationViewController;
        vcb.num=[self.text.text intValue]*10;
    }
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)popc:(id)sender
{
    [self performSegueWithIdentifier:@"popc" sender:nil];
}
- (IBAction)popd:(id)sender
{
    UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    DViewController *vcD = [sb instantiateViewControllerWithIdentifier:@"vcD"];
    [self presentViewController:vcD animated:YES completion:nil];
}
- (IBAction)pope:(id)sender
{
    EViewController *vce=[[EViewController alloc]init];
    [self presentViewController:vce animated:YES completion:nil];
    vce.num=[self.text.text intValue]*100;
}
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    [self.view endEditing:YES];
}
@end
